package com.noticestation.core;

import java.util.ArrayList;

import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.noticestation.collector.CollectorInterface;
import com.noticestation.presenter.PresenterInterface;

/*
 * This is the central class that works with the Spring container
 * to load tie collecters to presenters
 * 
 * @author Matthew Phillips
 */

public class Run
{
	static Logger log = Logger.getLogger("Run");

	private static CollectorInterface collector;
	private static PresenterInterface presenter;

	public static void main (String[] args)
	{
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("noticestation.xml");

		ArrayList list = collector.findEvents();
		presenter.present(list);
	}


	public CollectorInterface getCollector()
	{
		return collector;
	}


	public void setCollector(CollectorInterface collector)
	{
		this.collector = collector;
	}

	public static PresenterInterface getPresenter()
	{
		return presenter;
	}


	public void setPresenter(PresenterInterface presenter)
	{
		this.presenter = presenter;
	}
}